home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-27 | 5.5 KB | 17 lines | [TEXT/YHS2] |
- module Redraw where
-
- import Xlib
- import Utilities
-
- may_redraw :: Bool -> XInfo -> GameState -> IO ()
- may_redraw ok xinfo state = if ok then redraw xinfo state else return ()
-
- redraw :: XInfo -> GameState -> IO ()
-
- redraw xinfo state =
- let (XInfo display window gcontext gcontext2 gcontextp) = xinfo
- in
- xDrawRectangle (XDrawWindow window) gcontext2 (XRect 0 0 900 600) True >>
- drawBoard xinfo >>
- xDrawGlyphs (XDrawWindow window) gcontextp (XPoint 610 65) "Player 1" >>
- xDrawGlyphs (XDrawWindow windo